#region "ExceptionMessageGenerator"

/*
 * ####     Developer Name : Wang Yucai
 * 
 * ####     Development Tool : Microsoft VisualStudio 2010 Ultimate Edition
 * 
 * ####     Create Time : 2014-07-22 9:42:27
 * 
 * ####     Namespace : Masterduner.SourceStudio.Practices.DevelopmentLibrary.Utilities.DataConfiguration.Generators
 * 
 * ####     Type Name : ExceptionMessageGenerator
 * 
 * ####     Full Name : Masterduner.SourceStudio.Practices.DevelopmentLibrary.Utilities.DataConfiguration.Generators.ExceptionMessageGenerator
 * 
 * ####     Machine Name : GLCHQWYCWINW7
 * 
 * ####     UserName : GUOCOLAND/wangyucai
 * 
 * ####     CLR Version : 4.0.30319.18444
 * 
 * ####     Target Framework Version : 4.0
 */

#endregion

using System;

namespace Masterduner.SourceStudio.Practices.DevelopmentLibrary.Utilities.DataConfiguration.Generators
{
    /// <summary>
    /// <para>Masterduner.SourceStudio.Practices.DevelopmentLibrary.Utilities.DataConfiguration.Generators.ExceptionMessageGenerator</para>
    /// <para>
    /// Description
    /// </para>
    /// </summary>
    /// <remarks>
    /// <para>Target Framework Version : 4.0</para>
    /// </remarks>
    partial class ExceptionMessageGenerator
    {
        private Exception _exception;

        #region Exception
        /// <summary>
        /// 设置或获取异常。
        /// </summary>
        public Exception Exception
        {
            get { return _exception; }
            set { _exception = value; }
        }
        #endregion

        #region GetMessage
        /// <summary>
        /// 获取异常信息。
        /// </summary>
        /// <returns></returns>
        private string GetMessage()
        {
            return this.Exception.Message;
        }
        #endregion

        #region GetMethodName
        /// <summary>
        /// 获取发生异常的方法名称。
        /// </summary>
        /// <returns></returns>
        private string GetMethodName()
        {
            return this.Exception.TargetSite.Name;
        }
        #endregion

        #region GetSourceType
        /// <summary>
        /// 获取发生异常的类型名称。
        /// </summary>
        /// <returns></returns>
        private string GetSourceType()
        {
            return this.Exception.TargetSite.DeclaringType.AssemblyQualifiedName;
        }
        #endregion

        #region GetStackTrace
        /// <summary>
        /// 获取堆栈跟踪信息。
        /// </summary>
        /// <returns></returns>
        private string GetStackTrace()
        {
            return this.Exception.StackTrace;
        }
        #endregion
    }
}

#region README

/*
 * ####     ©2014 Wang Yucai
 * 
 * ####     Contact me
 *                  
 *                  E-mail : Masterduner@Yeah.net
 *                  Mobile : 13621384677
 *                  QQ : 180261899
 */

#endregion